<template>
  <div class="head">
    <div class="hostitle">
      <img src="@/assets/images/hosname.png" alt="" />
    </div>
    <div class="times">
      <div class="time">
        <div class="day">{{ timeofday }}</div>
        <div class="moment">{{ moment }}</div>
      </div>
      <div class="week">
        <div class="second">{{ seconds }}</div>
        <div class="weeks">{{ weeks }}</div>
      </div>
    </div>
  </div>
</template>
<script setup lang="ts">
import { times, getTimeOfDay, formatDate, getDayOfWeek } from "@/utils/time";
const timeofday = getTimeOfDay();
const moment = times(new Date());
const seconds = formatDate(new Date());
const weeks = getDayOfWeek();
</script>
<style lang="scss" scoped>
.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 30px;
}

.times {
  color: #fafafa;
  display: flex;
  flex-direction: column;
  align-items: flex-end;

  .time {
    display: flex;
    font-size: 24px;
    .day {
      margin-right: 5px;
    }
  }
  .week {
    display: flex;
    font-size: 16px;
    margin-top: 15px;

    .second {
      margin-right: 8px;
    }
  }
}
</style>
